/*  1:   */ package org.jetbrains.rpc;
/*  2:   */ 
/*  3:   */

import com.intellij.util.BooleanFunction;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jsonProtocol.Request;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */ 
/*  8:   */ public abstract class MessageWriter
/*  9:   */   implements BooleanFunction<Request>
/* 10:   */ {
/* 11:   */   public boolean fun(@NotNull Request paramRequest)
/* 12:   */   {
/* 13:10 */     if (paramRequest == null) {
/* 14:10 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/rpc/MessageWriter", "fun" }));
/* 15:   */     }
/* 16:10 */     CharSequence localCharSequence = paramRequest.toJson();
/* 17:11 */     if (MessageManager.LOG.isDebugEnabled()) {
/* 18:12 */       MessageManager.LOG.debug("OUT: " + localCharSequence.toString());
/* 19:   */     }
/* 20:14 */     return write(localCharSequence);
/* 21:   */   }
/* 22:   */   
/* 23:   */   protected abstract boolean write(@NotNull CharSequence paramCharSequence);
/* 24:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.rpc.MessageWriter

 * JD-Core Version:    0.7.0.1

 */